﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script src="Contents/js/jquery-1.6.1.min.js"></script>

    <script src="Contents/js/jquery.timer.js"></script>
</head>
<body>
    <script>

        var i = 0;

        var timer = $.timer(function () {
            //alert('This message was sent by a timer.');
            loadUrl();
        });

        var loadUrl = function () {
            i++;
            $.ajax({
                url: '/home/index',
                success: function () {
                    console.log(i);
                },
                fail: function () {
                }
            });
        }

        $(document).ready(function () {
            timer.set({ time: 600000, autostart: true });
        });
    </script>
</body>
</html>
